﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BesAsm.Emgaats.Core;
using BesAsm.Emgaats.Core.Commands;
using ESRI.ArcGIS.Framework;

namespace BesAsm.Emgaats.ModelBuilder.Commands
{
  public class BuildPgdbCommand : SingleCommand
  {
    PgdbBuilder _builder;

    public BuildPgdbCommand(Model model, IApplication arcApp)
    {
      _builder = new PgdbBuilder(model, arcApp);
    }

    #region IEmgaatsExtensionCommand Members

    public override void Execute()
    {
      base.Execute();
      _builder.WritePgdb();
    }

    public override void Undo()
    {
      throw new NotImplementedException();
    }

    public override string Name
    {
      get { return "Build model geodatabase"; }
    }

    public override string Description
    {
      get { return "Builds a new model geodatabase"; }
    }

    #endregion
  }
}
